package com.zzw.hj59;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 找出字符串中第一个只出现一次的字符
 * @Author: zzw
 */
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        char c;
        for (int i = 0; i < str.length(); i++) {
            c = str.charAt(i);
            int first = str.indexOf(c);
            int last = str.lastIndexOf(c);
            if (first == last) {
                System.out.println(c);
                break;
            } else {
                if (i == str.length() - 1) {
                    System.out.println(-1);
                    break;
                }
            }
        }
    }
}